package com.hyphenate.easeim;

import android.app.Application;

import androidx.annotation.NonNull;

import com.baidu.mapapi.SDKInitializer;
import com.hyphenate.easeim.common.utils.PreferenceManager;
import com.hyphenate.util.EMLog;
import com.salton123.app.BaseApplication;
import com.salton123.module.api.OnModuleIncubate;

public class EaseModuleIncubator implements OnModuleIncubate {
    @Override
    public void onCreate(Application application) {
        EaseFacade.registerActivityLifecycleCallbacks();
        initHx();
        SDKInitializer.initialize(application);
//        closeAndroidPDialog();
    }

    private void initHx() {
        PreferenceManager.init(BaseApplication.getInstance());
        if (EaseHelper.getInstance().getAutoLogin()) {
            EMLog.i("DemoApplication", "application initHx");
            EaseHelper.getInstance().init(BaseApplication.getInstance());
        }
    }
    @Override
    public void attachBaseContext(@NonNull Application application) {

    }

    @Override
    public void highPriority(@NonNull Application application) {

    }

    @Override
    public void mediumPriority(@NonNull Application application) {

    }

    @Override
    public void lowPriority(@NonNull Application application) {

    }
}
